<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
<div class="layui-form timo-compile">
    <form th:action="@{/manage/member/save}">
        <input type="hidden" name="id" th:if="${member}" th:value="${member.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">企业用户</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="name" placeholder="请输入企业用户"
                       th:value="${member?.name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户电话</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="phone" placeholder="请输入用户电话"
                       th:value="${member?.phone}">
            </div>
        </div>
        <!--        <div class="layui-form-item">-->
        <!--            <label class="layui-form-label">渠道ID</label>-->
        <!--            <div class="layui-input-inline">-->
        <!--                <input class="layui-input" type="text" name="source_id" placeholder="请输入渠道ID" th:value="${member?.source_id}">-->
        <!--            </div>-->
        <!--        </div>-->
        <div class="layui-form-item">
            <label class="layui-form-label required">渠道名称</label>
            <div class="layui-input-inline">
                <select name="sourceId" class="select" lay-filter="custId" lay-search="">
                    <option value="">请选渠道</option>
                    <span th:each="source:${srclist}">
                            <option th:if="${source.id}" th:text="${source.name} "
                                    th:selected="${member?.sourceId} == ${source.id}"
                                    th:value="${source.id}"></option>
                        </span>
                </select>
            </div>
        </div>
        <!--        <div class="layui-form-item">-->
        <!--            <label class="layui-form-label">企业ID</label>-->
        <!--            <div class="layui-input-inline">-->
        <!--                <input class="layui-input" type="text" name="company_id" placeholder="请输入企业ID" th:value="${member?.company_id}">-->
        <!--            </div>-->
        <!--        </div>-->
        <div class="layui-form-item">
            <label class="layui-form-label required">企业名称</label>
            <div class="layui-input-inline">
                <select name="company_id" class="select" lay-filter="custId" lay-search="">
                    <option value="">请选企业</option>
                    <span th:each="company:${comlist}">
                            <option th:if="${company.id}" th:text="${company.company_name} "
                                    th:selected="${member?.company_id} == ${company.id}"
                                    th:value="${company.id}"></option>

                        </span>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户头像</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="head" placeholder="请输入用户头像"
                       th:value="${member?.head}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="sex" placeholder="请输入性别" th:value="${member?.sex}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户密码</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="password" placeholder="请输入用户密码"
                       th:value="${member?.password}">
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>